-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.2] Support for receiving commands to manipulate Rollouts #4040
Conversation
cfae4fc
to
f7911b9
Compare
Signed-off-by: Douglas Camata <[email protected]> Signed-off-by: Luke Shumaker <[email protected]>
Signed-off-by: Luke Shumaker <[email protected]>
Signed-off-by: Douglas Camata <[email protected]> Signed-off-by: Luke Shumaker <[email protected]>
Signed-off-by: Douglas Camata <[email protected]> Signed-off-by: Luke Shumaker <[email protected]>
Signed-off-by: Douglas Camata <[email protected]> Signed-off-by: Luke Shumaker <[email protected]>
Signed-off-by: Douglas Camata <[email protected]> Signed-off-by: Luke Shumaker <[email protected]>
Signed-off-by: Douglas Camata <[email protected]> Signed-off-by: Luke Shumaker <[email protected]>
Signed-off-by: Douglas Camata <[email protected]> Signed-off-by: Luke Shumaker <[email protected]>
Signed-off-by: Douglas Camata <[email protected]> Signed-off-by: Luke Shumaker <[email protected]>
Signed-off-by: Douglas Camata <[email protected]> Signed-off-by: Luke Shumaker <[email protected]>
Signed-off-by: Douglas Camata <[email protected]> Signed-off-by: Luke Shumaker <[email protected]>
Signed-off-by: Douglas Camata <[email protected]> Signed-off-by: Luke Shumaker <[email protected]>
Signed-off-by: Douglas Camata <[email protected]> Signed-off-by: Luke Shumaker <[email protected]>
Signed-off-by: Douglas Camata <[email protected]> Signed-off-by: Luke Shumaker <[email protected]>
f7911b9
to
a64e90d
Compare
I've rebased this on to diff --git a/builder/Dockerfile b/builder/Dockerfile
index da85aba1a..279e6fc94 100644
--- a/builder/Dockerfile
+++ b/builder/Dockerfile
@@ -79,6 +79,7 @@ ADD pkg pkg
ADD vendor vendor
ADD go.mod go.mod
ADD go.sum go.sum
+
RUN --mount=type=cache,target=/root/.cache/go-build \
mkdir -p /go/bin && \
time go build -mod=vendor -o /go/bin/ ./cmd/...
diff --git a/go.mod b/go.mod
index cb8d5f737..03fb51bcc 100644
--- a/go.mod
+++ b/go.mod
@@ -48,6 +48,7 @@ go 1.17
require (
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible
+ github.com/argoproj/argo-rollouts v1.0.7
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
github.com/census-instrumentation/opencensus-proto v0.2.1
github.com/cncf/udpa/go v0.0.0-20210322005330-6414d713912e
@@ -98,8 +99,6 @@ require (
sigs.k8s.io/yaml v1.2.0
)
-require github.com/argoproj/argo-rollouts v1.0.7
-
require (
cloud.google.com/go v0.58.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect |
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…amata/remote-control-rollouts
Signed-off-by: Douglas Camata <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to handle merge conflicts and tests, but this looks good! 🙂 My comments below are things that don't need to block landing this.
) | ||
|
||
// rolloutsGetterFactory is a factory for creating RolloutsGetter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what's the purpose of a RolloutsGetter
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of RolloutsGetter
is to fetch Rollouts in a namespace inside the cluster.
docs/releaseNotes.yml
Outdated
- title: Support received commands to pause, continue and abort a Rollout via Agent directives | ||
type: feature | ||
body: >- | ||
The Emissary agent now receive commands to manipulate Rollouts (pause, continue, and abort are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should really be "receives". 🙂
a.ambassadorAPIKeyMutex.Lock() | ||
apiKey := a.ambassadorAPIKey | ||
a.ambassadorAPIKeyMutex.Unlock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth a comment that you really don't want to hold this lock during the report-command-result call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kflynn Why? Where would you recommend to use the mutex to access the api key from the agent and send it down to this point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve the conflicts, and it looks fine to me.
Signed-off-by: Douglas Camata <[email protected]>
…amata/remote-control-rollouts
Signed-off-by: Douglas Camata <[email protected]>
Description
This pull requests add support Rollouts manipulation commands sent by Ambassador's backend through Agent directives and reports back with results of their execution.
Currently 3 commands are supported:
The report includes:
Related Issues
List related issues.
Testing
Checklist
I made sure to update
CHANGELOG.md
.Remember, the CHANGELOG needs to mention:
This is unlikely to impact how Ambassador performs at scale.
Remember, things that might have an impact at scale include:
My change is adequately tested.
Remember when considering testing:
I updated
DEVELOPING.md
with any any special dev tricks I had to use to work on this code efficiently.